﻿using Codemonk.Pease.Server.HttpServer;
using System;
using System.Web;

namespace Codemonk.Pease.Server.Example
{
    public sealed class AppoinedJsonHttpHandler : HttpAsyncHandler, IHttpAsyncHandler
    {
        protected override IScheduler Scheduler
        {
            get { return Codemonk.Pease.Server.Scheduler.Instance; }
        }

        protected override IResponsedAsyncResult CreateAsyncResult(HttpContext context, AsyncCallback cb, object extraData)
        {
            return new AppoinedJsonAsyncResult
            {
                HttpContext = context,
                Callback = cb
            };
        }
    }
}
